<?php
namespace Home\Model;
use Think\Model;
class ComboCommandModel extends Model {
    public function getComboCommandList($cond=null){
    	$res = M('combo_command')->join('command on combo_command.command_id = command.command_id')->where($cond)
    		->select();
    	return $res;
    }
    
    public function insertComboCommandList($data){
    	if(!$data){
    		return false;
    	}
    	$res = M('combo_command')->addAll($data);
    	return $res;
    }
    
    public function removeComboCommandList($cond){
    	if(!$cond){
    		return false;
    	}
    	$res = M('combo_command')->where($cond)->delete();
    	return $res;
    }
    
    public function getComboCommandInfo($cond){
    	if(!$cond){
    		return false;
    	}
    	$res = M('combo_command')->where($cond)
    		->find();
    	return $res;
    }
    
    public function reviseComboCommandInfo($cond,$data){
    	if(!$cond || !$data){
    		return false;
    	}
    	$res = M('combo_command')->where($cond)
    		->save($data);
    	return $res;
    
    	
    }
    
}